//
//  ZYYSegment.h
//  TTYL
//
//  Created by apple on 2017/3/3.
//  Copyright © 2017年 深圳市学海无涯移动科技有限公司. All rights reserved.
//

#import <UIKit/UIKit.h>
@protocol ZYYSegmentDelegate <NSObject>
@optional
- (void)scrollToPage:(int)page;
@end
@interface ZYYSegment : UIView
@property (nonatomic, weak) id <ZYYSegmentDelegate> delegate;

@property(nonatomic, assign) CGFloat maxWidth;
@property(nonatomic,strong)NSMutableArray *titleList;
@property(nonatomic,strong)NSMutableArray *buttonList;
@property(nonatomic,weak)CALayer *LGLayer;
@property(nonatomic,assign)CGFloat bannerNowX;

+ (instancetype)initWithTitleList:(NSMutableArray *)titleList;
-(void)moveToOffsetX:(CGFloat)X;
@end
